package com.love.marriage.userTransactionInfo.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.love.marriage.common.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * description:  用户消费记录表类
 * author:       mybatisPlus
 * createDate: 2024-10-17 07:58:40
 * version:      1.0.0
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("user_transaction_info_t")
@Schema(description = "用户消费记录表")
public class UserTransactionInfo extends BaseEntity<UserTransactionInfo>{

    @Schema(description = "用户ID", type = "Long", implementation = Long.class)
    @TableField("user_id")
    private Long userId;

    @Schema(description = "消费金额", type = "BigDecimal", implementation = BigDecimal.class)
    @TableField("transaction_amount")
    private BigDecimal transactionAmount;

    @Schema(description = "消费类型", type = "String", implementation = String.class)
    @TableField("transaction_type")
    private String transactionType;

    @Schema(description = "消费来源: MONEY=金钱, BALANCE=余额", type = "String", implementation = String.class)
    @TableField("transaction_source")
    private String transactionSource;

    @Schema(description = "关联业务ID (如订单ID、商品ID等)", type = "Long", implementation = Long.class)
    @TableField("related_business_id")
    private Long relatedBusinessId;

    @Schema(description = "消费时间", type = "LocalDateTime", implementation = LocalDateTime.class)
    @TableField("transaction_time")
    private LocalDateTime transactionTime;

    @Schema(description = "消费描述或备注", type = "String", implementation = String.class)
    @TableField("`description`")
    private String description;

    @Schema(description = "订单ID", type = "Long", implementation = Long.class)
    @TableField(value = "order_id")
    private Long orderId;
}
